package com.example.demo.controller;


import com.example.demo.Server.CompanyServer;
import com.example.demo.entity.Company;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

@RestController
public class Compony_Controller {

    @Autowired
    private CompanyServer companyServer;

    @GetMapping("/select_compny")
    public ArrayList<Company> select_compny()
    {
        return companyServer.select_compny();
    }
    @GetMapping("/select_compny_by_name")
    public ArrayList<Company> select_compny_by_name(String name)
    {
        return companyServer.select_compny_by_name(name);
    }
}
